home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / dino / dino_bot.1 / source / library / stub.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-04-27  |  1.2 KB  |  76 lines

  1. /* Copyright, 1990, Regents of the University of Colorado */
  2. #include "D_lib.h"
  3.  
  4. D_recv_no_storage(){};
  5.  
  6.  
  7. #if (D_MACH == D_CUBE)
  8.  
  9. #if D_HOST
  10. int Note_time(i_start){return 0;};
  11. #else
  12. static long dummy[20];
  13. long *timer_array=dummy, prof1b, prof2b;
  14. int Note_time(i_start) /*return last stop value for stacking*/
  15.          int i_start;
  16.         {
  17.         static int i_stop = -1;
  18.         int reg;
  19.         long t;
  20.  
  21.         stop_timing(&t);
  22.         if (i_start>=0)
  23.                 timer_array[i_start]-=t;
  24.         if (i_stop>=0)
  25.                 timer_array[i_stop]+=t;
  26.         reg = i_stop;
  27.         i_stop = i_start;
  28.         return reg;
  29.         }
  30.  
  31. start_timing()
  32.         {
  33.         prof1b=clock();
  34.         }
  35. stop_timing(p)
  36.          long *p;
  37.         {
  38.         prof2b=clock();
  39.         *p=prof2b - prof1b;
  40.         }
  41. #endif
  42. #else
  43. start_timing(){}
  44. Note_time(a)int a;{}
  45. long *timer_array;
  46. #endif
  47.  
  48. /* moved ginv to route.c, & made it static so it wouldn't clash with
  49. the ipsc2 simulator */
  50.  
  51. /* ginv(n)
  52.     int n;
  53. */
  54.     /*
  55.  
  56.     ginv = inverse of gray function
  57.  
  58.     answers the inevitable question, what task is being
  59.     carried out on node n?
  60.     */
  61.     
  62. /*
  63.     {
  64.     int i, t;
  65.     t = n/2;
  66.     i = n;
  67.     while(t != 0)
  68.            {
  69.            i = i^t;
  70.            t = t/2;
  71.            }
  72.     return(i);
  73.     }
  74.  
  75. */
  76.